package com.code.time1124;

import java.util.Arrays;

/**
 * @author Administrator
 *
 *1. 将int[] arr = ｛22，11，44，8，2，80，77｝ 复制到新数组 newArr
	只复制 从第2个元素到第5个元素并且降序排列	
	arraycopy(arr,1,newArr,0,4)
	11，44，8，2		reverse()	StringBuffer
	28,11,44
	44,11,82
 *
 *
 */
public class HomeWork1124 {

	public static void main(String[] args) {
		int[] arr = {22,11,44,8,2,80,77};
		int[] arrNew = new int[4];
		System.arraycopy(arr, 1, arrNew, 0, 4);
//		Arrays.sort(arrNew);
		String str = Arrays.toString(arrNew);
		StringBuffer str1 = new StringBuffer(str.substring(1,str.length()-1));
		str1.reverse();
		String str2 = new String(str1);
		String[] res = str2.split(",");
		System.out.println(Arrays.toString(res));
		System.out.println("-------------------------------");
		String[] arr2 = {"hao.html","Hello.exe","haha.txt","abc.txt","cdf.doc","test.png","test2.jpg"};
		for (String s : arr2) {
			if(s.endsWith(".txt")){
				System.out.println(s.toUpperCase());
			}
		}
		System.out.println("------------------------------");
		
		
	}
	public String changeMoney(String str){

		
		return str;
	}

}
